Clojure, Emacs, and Evil Mode

I work with one of those functional language kooks who end every thought with “Haskell,” use xmonad or Ratpoison while scoffing at GUIs, and edit everything, even selfies, in Emacs. Serendipitously, he just walked by, read my opening sentence, and said, “Actually, Emacs DOES support graphics editing. Haskell.”

Also at work, a group of us are learning Clojure, evidenced by our once-a-week Clojure Club meetings. Progress has been slow but steady and we’ve found a lot to like about Clojure.

One uncomfortable truth has emerged in these meetings, however: most of us are Vim users, and Clojure Cool Kids clearly prefer Emacs. We’ve been trumpeting that Vim + Fireplace >= Emacs, but I see resolve crumbling. It’s not just us, of course — other Vim users chasing Clojure are wrestling with the same editor conflict: do we really have to forsake our beloved modal editor and familiar key bindings to achieve Clojure zen?

This morning a club member displayed his weakening resolve via email with this gem:

Have you ever tried evil mode for Emacs? Maybe it could provide a robust Clojure environment without having to type meta-control-bucky-O shift-N to delete a line

“Evil” is collapsed from “extensible vi layer”, and grants you some form of vi emulation in Emacs. You can find it here, and apparently many Vim users adopting Clojure are finding it as well. I emailed back:

Not sure how I feel about Evil mode. Somehow, it feels like you’re marrying Emacs but having an affair with Vim. If you’re going to commit, you’ve got to commit!

His response, which actually made me LOL, was:

Don’t think of it like an affair. Think of it like asking Emacs to wear a nice dress. It’s installing a nice text editor into the Emacs operating system!

Haskell man refused to see the levity and frumpily chimed in:

It’s definitely cheating. It’s like writing getters and setters in JavaScript. Haskell

I’ve gotten as far as installing Emacs and Projectile, but haven’t embraced Evil yet. And I’ve made any edits to ~/.emacs.d/personal/config.el in Vim. But I’ve been eyeing my unread copy of Gnu Emacs Manual and thinking how deeply I want to commit to Clojure. Haskell.

1 Response

  1. Sean says:

    Haskell!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.